package com.dc.free.common.base;

import com.alibaba.fastjson.JSONObject;
import com.dc.free.util.ControllerUtil;
import com.dc.free.util.StatusUtil;
import com.jfinal.core.Controller;

public abstract class BaseController extends Controller {
	
	
	public StatusUtil renderStatus(String code, String msg, String stack, Object data) {
		return ControllerUtil.renderStatus(this, code, msg, stack, data);
	}
	
	public StatusUtil renderOk(String msg, Object data, Object... args) {
		return ControllerUtil.renderOk(this, msg, data, args);
	}
	
	public StatusUtil renderOk(Object data) {
		return ControllerUtil.renderOk(this, data);
	}
	
	public StatusUtil renderOk(String msg, Object... args) {
		return ControllerUtil.renderOk(this, msg, args);
	}
	
	public StatusUtil renderOk() {
		return ControllerUtil.renderOk(this);
	}
	
	public StatusUtil renderError(String code, String stack, Object data, Object... args) {
		return ControllerUtil.renderError(this, code, stack, data, args);
	}
	
	public StatusUtil renderError(String code, String stack, Object... args) {
		return ControllerUtil.renderError(this, code, stack, args);
	}
	
	public StatusUtil renderError(String code, Object data, Object... args) {
		return ControllerUtil.renderError(this, code, data, args);
	}
	
	public StatusUtil renderError(String code, Object... args) {
		return ControllerUtil.renderError(this, code, args);
	}
	
	public StatusUtil renderError() {
		return ControllerUtil.renderError(this);
	}
	
	public JSONObject getParameters() {
		return ControllerUtil.getParameters(this);
	}
	
	public JSONObject getParameterName() {
		return ControllerUtil.getParameterName(this);
	}
	
}
